<template>
    <p v-once>{{msg}}</p>           <!-- 本行msg值不会改变 -->
    <p>{{msg}}</p>                  <!-- 本行msg值会随之改变 -->
    <p>
        <input type="text" v-model="msg" name="">
    </p>
</template>

<script>
import { reactive, toRefs } from 'vue'

export default {
  setup () {
    const state = reactive({
      msg: 'hello'
    })
    return {
      ...toRefs(state)
    }
  }
}
</script>
